.class public final Ldgb/t3;
.super Ldgb/e3;
.source "SourceFile"


# instance fields
.field private b:Landroid/content/Context;

.field private c:Ljava/lang/String;

.field private d:Ljava/io/File;

.field private e:[C

.field private f:Ljava/lang/String;

.field private g:I

.field private h:Ldgb/m3;

.field volatile i:Z

.field private j:Z

.field private k:Z

.field l:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ldgb/s3;",
            ">;"
        }
    .end annotation
.end field

.field m:Ldgb/p3;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;[CI)V
    .locals 3

    .line 1
    invoke-direct {p0}, Ldgb/e3;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Ldgb/t3;->b:Landroid/content/Context;

    .line 3
    iput-object v0, p0, Ldgb/t3;->d:Ljava/io/File;

    .line 4
    iput-object v0, p0, Ldgb/t3;->e:[C

    .line 5
    iput-object v0, p0, Ldgb/t3;->f:Ljava/lang/String;

    const/4 v1, 0x0

    .line 6
    iput v1, p0, Ldgb/t3;->g:I

    .line 7
    iput-boolean v1, p0, Ldgb/t3;->i:Z

    .line 8
    iput-boolean v1, p0, Ldgb/t3;->j:Z

    .line 9
    iput-boolean v1, p0, Ldgb/t3;->k:Z

    .line 10
    new-instance v2, Ljava/util/HashMap;

    invoke-direct {v2}, Ljava/util/HashMap;-><init>()V

    iput-object v2, p0, Ldgb/t3;->l:Ljava/util/HashMap;

    .line 11
    iput-object v0, p0, Ldgb/t3;->m:Ldgb/p3;

    .line 12
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Ldgb/t3;->b:Landroid/content/Context;

    .line 13
    iput-object p2, p0, Ldgb/t3;->c:Ljava/lang/String;

    .line 14
    invoke-virtual {p1, p2}, Landroid/content/Context;->getDatabasePath(Ljava/lang/String;)Ljava/io/File;

    move-result-object p1

    iput-object p1, p0, Ldgb/t3;->d:Ljava/io/File;

    .line 15
    iput p4, p0, Ldgb/t3;->g:I

    .line 16
    array-length p1, p3

    new-array p1, p1, [C

    .line 17
    array-length p2, p3

    invoke-static {p3, v1, p1, v1, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 18
    iput-object p1, p0, Ldgb/t3;->e:[C

    .line 19
    invoke-static {p1}, Ldgb/t3;->b([C)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Ldgb/t3;->f:Ljava/lang/String;

    .line 20
    new-instance p1, Ldgb/p3;

    iget-object p2, p0, Ldgb/t3;->b:Landroid/content/Context;

    iget-object p3, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-direct {p1, p2, p3}, Ldgb/p3;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    iput-object p1, p0, Ldgb/t3;->m:Ldgb/p3;

    .line 21
    new-instance p1, Ldgb/t3$a;

    invoke-direct {p1, p0}, Ldgb/t3$a;-><init>(Ldgb/t3;)V

    invoke-static {p1}, Ldgb/y3;->b(Ljava/lang/Runnable;)V

    return-void
.end method

.method private a(Ljava/lang/String;Ldgb/s3;)V
    .locals 1

    .line 2
    new-instance v0, Ldgb/t3$b;

    invoke-direct {v0, p0, p2, p1}, Ldgb/t3$b;-><init>(Ldgb/t3;Ldgb/s3;Ljava/lang/String;)V

    invoke-static {v0}, Ldgb/y3;->b(Ljava/lang/Runnable;)V

    return-void
.end method

.method static synthetic a(Ldgb/t3;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Ldgb/t3;->j:Z

    return p0
.end method

.method private static b([C)Ljava/lang/String;
    .locals 5

    if-nez p0, :cond_0

    const/4 p0, 0x0

    return-object p0

    .line 26
    :cond_0
    array-length v0, p0

    mul-int/lit8 v1, v0, 0x2

    .line 27
    new-array v1, v1, [B

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_1

    .line 28
    aget-char v3, p0, v2

    int-to-byte v3, v3

    add-int v4, v2, v2

    .line 29
    aput-byte v3, v1, v4

    add-int/lit8 v4, v4, 0x1

    shr-int/lit8 v3, v3, 0x8

    int-to-byte v3, v3

    .line 30
    aput-byte v3, v1, v4

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    const/16 p0, 0x61

    .line 31
    invoke-static {p0, v1}, Ldgb/k3;->a(C[B)Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method static synthetic b(Ldgb/t3;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Ldgb/t3;->k:Z

    return p0
.end method

.method static synthetic c(Ldgb/t3;)Ldgb/m3;
    .locals 0

    .line 1
    iget-object p0, p0, Ldgb/t3;->h:Ldgb/m3;

    return-object p0
.end method

.method private e()Z
    .locals 6

    .line 1
    iget-object v0, p0, Ldgb/t3;->d:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-nez v0, :cond_0

    iget v0, p0, Ldgb/t3;->g:I

    if-ne v0, v1, :cond_0

    return v2

    .line 2
    :cond_0
    new-instance v0, Ldgb/o3;

    iget-object v3, p0, Ldgb/t3;->m:Ldgb/p3;

    iget-object v4, p0, Ldgb/t3;->c:Ljava/lang/String;

    const-string v5, "tcfb3352c2df335696c6bc631932c6a61a4cdf318"

    invoke-direct {v0, v3, v4, v5}, Ldgb/o3;-><init>(Ldgb/p3;Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    iget-object v3, p0, Ldgb/t3;->b:Landroid/content/Context;

    iget-object v4, p0, Ldgb/t3;->c:Ljava/lang/String;

    iget-object v5, p0, Ldgb/t3;->e:[C

    invoke-static {v3, v4, v5}, Ldgb/k3;->a(Landroid/content/Context;Ljava/lang/String;[C)[C

    move-result-object v3

    .line 4
    new-instance v4, Ldgb/m3;

    iget-object v5, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-direct {v4, v5, v0, v3}, Ldgb/m3;-><init>(Ljava/lang/String;Ldgb/o3;[C)V

    .line 5
    invoke-virtual {v4}, Ldgb/m3;->a()Z

    move-result v0

    if-nez v0, :cond_1

    return v2

    .line 6
    :cond_1
    invoke-virtual {v4}, Ldgb/m3;->b()Z

    move-result v0

    if-nez v0, :cond_3

    .line 7
    sget-boolean v0, Ldgb/x2;->b:Z

    if-eqz v0, :cond_2

    .line 8
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "verify "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, " failed"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/a4;->a(Ljava/lang/String;)V

    :cond_2
    return v2

    .line 9
    :cond_3
    iput-object v4, p0, Ldgb/t3;->h:Ldgb/m3;

    return v1
.end method


# virtual methods
.method public a(Ljava/lang/String;)Ldgb/d3;
    .locals 3

    .line 3
    iget-boolean v0, p0, Ldgb/t3;->j:Z

    if-eqz v0, :cond_1

    iget-boolean v0, p0, Ldgb/t3;->k:Z

    if-eqz v0, :cond_1

    .line 4
    sget-boolean p1, Ldgb/x2;->b:Z

    if-eqz p1, :cond_0

    .line 5
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "ERROR: open storage "

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "failed"

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ldgb/a4;->a(Ljava/lang/String;)V

    .line 6
    :cond_0
    new-instance p1, Ljava/lang/RuntimeException;

    const-string v0, "mLoaded && mFailedToLoad == true"

    invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 7
    :cond_1
    iget-boolean v0, p0, Ldgb/t3;->i:Z

    if-nez v0, :cond_3

    .line 8
    iget-object v0, p0, Ldgb/t3;->l:Ljava/util/HashMap;

    monitor-enter v0

    .line 9
    :try_start_0
    iget-object v1, p0, Ldgb/t3;->l:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ldgb/s3;

    if-eqz v1, :cond_2

    .line 10
    invoke-virtual {v1}, Ldgb/s3;->b()Z

    move-result v2

    if-nez v2, :cond_2

    .line 11
    monitor-exit v0

    return-object v1

    .line 12
    :cond_2
    new-instance v1, Ldgb/s3;

    iget-object v2, p0, Ldgb/t3;->m:Ldgb/p3;

    invoke-direct {v1, v2, p0, p1}, Ldgb/s3;-><init>(Ldgb/p3;Ldgb/t3;Ljava/lang/String;)V

    .line 13
    invoke-direct {p0, p1, v1}, Ldgb/t3;->a(Ljava/lang/String;Ldgb/s3;)V

    .line 14
    iget-object v2, p0, Ldgb/t3;->l:Ljava/util/HashMap;

    invoke-virtual {v2, p1, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 15
    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception p1

    .line 16
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1

    .line 17
    :cond_3
    new-instance p1, Ljava/lang/RuntimeException;

    const-string v0, "mIsClosed == true"

    invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public a()Z
    .locals 1

    .line 18
    iget-boolean v0, p0, Ldgb/t3;->j:Z

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Ldgb/t3;->k:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    return v0

    .line 19
    :cond_0
    monitor-enter p0

    .line 20
    :try_start_0
    iget-boolean v0, p0, Ldgb/t3;->i:Z

    monitor-exit p0

    return v0

    :catchall_0
    move-exception v0

    .line 21
    monitor-exit p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0
.end method

.method public a([C)Z
    .locals 1

    if-eqz p1, :cond_1

    .line 22
    array-length v0, p1

    if-nez v0, :cond_0

    goto :goto_0

    .line 23
    :cond_0
    invoke-static {p1}, Ldgb/t3;->b([C)Ljava/lang/String;

    move-result-object p1

    .line 24
    iget-object v0, p0, Ldgb/t3;->f:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    return p1

    :cond_1
    :goto_0
    const/4 p1, 0x0

    return p1
.end method

.method b()V
    .locals 4

    .line 2
    monitor-enter p0

    const/4 v0, 0x1

    .line 3
    :try_start_0
    invoke-direct {p0}, Ldgb/t3;->e()Z

    move-result v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_2

    .line 4
    :try_start_1
    iput-boolean v0, p0, Ldgb/t3;->j:Z

    if-nez v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 5
    :goto_0
    iput-boolean v0, p0, Ldgb/t3;->k:Z

    .line 6
    sget-boolean v1, Ldgb/x2;->b:Z

    if-eqz v1, :cond_2

    if-eqz v0, :cond_1

    .line 7
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "failed to load master container "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/a4;->a(Ljava/lang/String;)V

    goto :goto_1

    .line 8
    :cond_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "load "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, " success"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/a4;->a(Ljava/lang/String;)V

    .line 9
    :cond_2
    :goto_1
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V

    .line 10
    iget-boolean v0, p0, Ldgb/t3;->j:Z

    if-eqz v0, :cond_3

    iget-boolean v0, p0, Ldgb/t3;->k:Z

    if-eqz v0, :cond_3

    .line 11
    sget-object v0, Ldgb/e3;->a:Ljava/util/Map;

    monitor-enter v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 12
    :try_start_2
    sget-object v1, Ldgb/e3;->a:Ljava/util/Map;

    iget-object v2, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-interface {v1, v2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 13
    monitor-exit v0

    goto :goto_2

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :try_start_3
    throw v1

    .line 14
    :cond_3
    :goto_2
    monitor-exit p0

    return-void

    :catchall_1
    move-exception v0

    goto :goto_5

    :catchall_2
    move-exception v1

    .line 15
    iput-boolean v0, p0, Ldgb/t3;->j:Z

    .line 16
    iput-boolean v0, p0, Ldgb/t3;->k:Z

    .line 17
    sget-boolean v2, Ldgb/x2;->b:Z

    if-eqz v2, :cond_5

    if-eqz v0, :cond_4

    .line 18
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "failed to load master container "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/a4;->a(Ljava/lang/String;)V

    goto :goto_3

    .line 19
    :cond_4
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "load "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, " success"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/a4;->a(Ljava/lang/String;)V

    .line 20
    :cond_5
    :goto_3
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V

    .line 21
    iget-boolean v0, p0, Ldgb/t3;->j:Z

    if-eqz v0, :cond_6

    iget-boolean v0, p0, Ldgb/t3;->k:Z

    if-eqz v0, :cond_6

    .line 22
    sget-object v0, Ldgb/e3;->a:Ljava/util/Map;

    monitor-enter v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    .line 23
    :try_start_4
    sget-object v2, Ldgb/e3;->a:Ljava/util/Map;

    iget-object v3, p0, Ldgb/t3;->c:Ljava/lang/String;

    invoke-interface {v2, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 24
    monitor-exit v0

    goto :goto_4

    :catchall_3
    move-exception v1

    monitor-exit v0
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_3

    :try_start_5
    throw v1

    :cond_6
    :goto_4
    throw v1

    .line 25
    :goto_5
    monitor-exit p0
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_1

    throw v0
.end method

.method declared-synchronized c()V
    .locals 2

    monitor-enter p0

    .line 2
    :goto_0
    :try_start_0
    iget-boolean v0, p0, Ldgb/t3;->j:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v0, :cond_1

    .line 3
    :try_start_1
    sget-boolean v0, Ldgb/x2;->b:Z

    if-eqz v0, :cond_0

    const-string v0, "wait main container 1000ms ..."

    .line 4
    invoke-static {v0}, Ldgb/a4;->a(Ljava/lang/String;)V

    :cond_0
    const-wide/16 v0, 0x3e8

    .line 5
    invoke-virtual {p0, v0, v1}, Ljava/lang/Object;->wait(J)V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 6
    :try_start_2
    invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_0

    .line 7
    :cond_1
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    goto :goto_2

    :goto_1
    throw v0

    :goto_2
    goto :goto_1
.end method

.method public d()Ljava/lang/String;
    .locals 1

    .line 1
    iget-object v0, p0, Ldgb/t3;->c:Ljava/lang/String;

    return-object v0
.end method
